//
//  RegisterTextController.m
//  FinancialProduct
//
//  Created by Stella on 2017/9/6.
//  Copyright © 2017年 maq. All rights reserved.
//
#import "NetworkConfig.h"

#import "SVProgressHUD.h"
#import "RegisterTextController.h"

@interface RegisterTextController ()
@property (weak, nonatomic) IBOutlet UIWebView *myWebView;

@end

@implementation RegisterTextController

- (void)viewDidLoad {
    [super viewDidLoad];
//    NSString *path=[[NSBundle mainBundle]pathForResource:@"registerTxt" ofType:@"html"];
//    NSString *html = [[NSString alloc] initWithContentsOfFile:path encoding:NSUTF8StringEncoding error:nil];
    //加载js
//    [_myWebView loadHTMLString:html baseURL:[[NSBundle mainBundle] bundleURL]];
//    API_RegisterText
    [_myWebView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:API_RegisterText]]];
    [SVProgressHUD show];
    
}

- (void)webViewDidStartLoad:(UIWebView *)webView{
    NSLog(@"webViewDidStartLoad");
}
-(void)webViewDidFinishLoad:(UIWebView *)webView{
    NSLog(@"webViewDidFinishLoad");
    [SVProgressHUD dismiss];
    
}

-(void)webView:(UIWebView *)webView didFailLoadWithError:(NSError *)error{
    NSLog(@"didFailLoadWithError:%@",error);
    [SVProgressHUD dismiss];
}
- (IBAction)backtoSetPass:(id)sender {
    [self.navigationController popViewControllerAnimated:YES];
}
- (IBAction)goon:(id)sender {
    if (self.returnAgree) {
        self.returnAgree();
    }
    [self.navigationController popViewControllerAnimated:YES];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
